<?php
namespace app\api\controller;

use app\common\model\Admin;
use app\common\model\GlobalData;
use think\Controller;
use app\common\model\RegisterAct as RegisterActModel;

class System extends Controller
{
    public function modifyAdmin()
    {
    	$vb=new Admin();
    	$input=input();
    	if($input['id']){
    		$result=$vb->editAdmin($input);
	    }else{
    		$result=$vb->addAdmin($input);
	    }
	    if($result){
    		$this->success("操作成功");
	    }else{
	    	$this->error("操作失败");
	    }
    }
	
	
	public function modifySetting()
	{
		$model=new GlobalData();
		$input=input();
		$result=$model->addData($input);
		if($result){
			$this->success("操作成功");
		}else{
			$this->error("操作失败");
		}
	}
}
